package com.py.framework.service.impl;

import com.py.framework.dao.HolidayDao;
import com.py.framework.entity.HolidayEntity;
import com.py.framework.service.HolidayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 节假日实现类
 *
 * @author YaoS
 * @version shanghai
 * @date 2019-02-21 09:32
 */
@Service
public class HolidayServiceImpl implements HolidayService {

    @Autowired
    HolidayDao holidayDao;

    @Override
    public void addHoliday(List<HolidayEntity> entityList) {
        holidayDao.addHoliday(entityList);
    }

    @Override
    public void deleteHoliday(List<String> list) {
        holidayDao.deleteHoliday(list);
    }

    @Override
    public String isHoliday(Date date) {
        return holidayDao.isHoliday(date);
    }

    @Override
    public List<HolidayEntity> selectAll(String year) {
        return holidayDao.selectAll(year);
    }

    @Override
    public List<HolidayEntity> selectAllForPage(Map<String, Object> params) {
        return holidayDao.selectAllForPage(params);
    }

	@Override
	public List<Map<String, Object>> selectAllFar(String year) {
		return holidayDao.selectAllFar(year);
	}
}
